package com.cx.controller.wjr;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("user")
public class TestController {


    @RequestMapping("123")
    public String userLogin(String username, String pwd , HttpServletResponse response){
        System.out.println("xxxx");
        System.out.println(pwd);
        Cookie cookie1 = new Cookie("username",username);
        response.addCookie(cookie1);
        System.out.println(username);
        return "redirect:http://localhost:63342/sdkd-parent/ssm/src/main/webapp/user/html/HomePage.html";
    }

}
